import {API} from '../api/index.js'




/**
 * 确认订单
 * @param {*} param 
 */
const _confirmOrder =function(param){
    const url="/mobile/order/confirmOrder"
    const result=API.post(url,param)
    return result
}

/**
 * 立即支付
 * @param {*} param 
 */
const _orderPay =function(param){
    const url="/mobile/order/orderPay"
    const result=API.post(url,param)
    return result
}

/**
 * 获取待收货/已收货订单
 * @param {*} param 
 */
const _getOrderList =function(param){
    const url="/mobile/order/getOrderList"
    const result=API.post(url,param)
    return result
}

/**
 * 确认收货
 * @param {*} param 
 */
const _ajaxis_yes =function(param){
    const url="/mobile/order/ajaxis_yes"
    const result=API.post(url,param)
    return result
}

/**
 * 申请退货
 * @param {*} param 
 */
const _ajaxrefund =function(param){
    const url="/mobile/user/ajaxrefund"
    const result=API.post(url,param)
    return result
}

/**
 * 退货订单列表
 * @param {*} param 
 */
const _getUserRefund =function(param){
    const url="/mobile/user/getUserRefund"
    const result=API.post(url,param)
    return result
}

/**
 * 填写退货物流
 * @param {*} param 
 */
const _logistic =function(param){
    const url="/mobile/user/logistic"
    const result=API.post(url,param)
    return result
}



/**
 * 订单详情
 * @param {*} param 
 */
const _getOrderInfo =function(param){
    const url="/mobile/order/getOrderInfo"
    const result=API.post(url,param)
    return result
}

/**
 * 获取订单地址
 * @param {*} param 
 */
const _getOrderAddress =function(param){
    const url="/mobile/order/getOrderAddress"
    const result=API.post(url,param)
    return result
}


/**
 * 获取售后订单详情
 * @param {*} param 
 */
const _refundOrderInfo =function(param){
    const url="/mobile/user/refundOrderInfo"
    const result=API.post(url,param)
    return result
}





/**
 * 退货买家确认收货
 * @param {*} param 
 */
const _confirmRefund =function(param){
    const url="/mobile/user/confirmRefund"
    const result=API.post(url,param)
    return result
}


/**
 * 获取可申请退换订单列表
 * @param {*} param 
 */
const _getOrderRefundList =function(param){
    const url="/mobile/order/getOrderRefundList"
    const result=API.post(url,param)
    return result
}



export {
    _confirmOrder,
    _orderPay,
    _getOrderList,
    _ajaxis_yes,
    _ajaxrefund,
    _getUserRefund,
    _logistic,
    _getOrderInfo,
    _getOrderAddress,
    _refundOrderInfo,
    _confirmRefund,
    _getOrderRefundList
}